package com.derbysoft.dswitch.adapter.ihg.common.domain;

public enum RequestCode {

    OTA_HotelAvailRQ,
    OTA_HotelPreviewRQ,
    OTA_HotelResRQ,
    OTA_CancelRQ;

    public static RequestCode fromRequest(String request) {
        for (RequestCode requestCode : RequestCode.values()) {
            if (request.contains(requestCode.name())) {
                return requestCode;
            }
        }
        return null;
    }
}
